﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
namespace QuanLyKhachSan
{
    public partial class UC_DichVu_List : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                pnlDichVu.Load += new EventHandler(pnlDichVu_Load);
                if (!Page.IsPostBack)
                {

                }
            }
            catch (Exception)
            {

                throw;
            }
        }

        void pnlDichVu_Load(object sender, EventArgs e)
        {
            try
            {
                lstDichVu.DataSource = DichVuBLL.DichVu_GetItems();
                lstDichVu.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public string Format_NumberVietnamese(string Gia)
        {
            try
            {
                decimal value = decimal.Parse(Gia);
                string retGia = value.ToString("N", CultureInfo.CreateSpecificCulture("vi-VN"));
                return retGia.Replace(",00", "");
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}